<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>calerf</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : December 1994</div>
    <p>
      <b>calerf</b> -   computes error functions.  </p>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>x</b>
        </tt>: real vector or matrix</li>
      <li>
        <tt>
          <b>flag</b>
        </tt>: integer indicator</li>
      <li>
        <tt>
          <b>y</b>
        </tt>: real vector or matrix (of same size than x)</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>calerf(x,0)</b>
      </tt> computes the error function <tt>
        <b>erf(x)</b>
      </tt>
    </p>
    <p>
      <tt>
        <b>calerf(x,1)</b>
      </tt> computes the complementary error function <tt>
        <b>erfc(x)</b>
      </tt>
    </p>
    <p>
      <tt>
        <b>calerf(x,2)</b>
      </tt> computes the  scaled complementary error function <tt>
        <b>erfcx(x)</b>
      </tt>
    </p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

deff('y=f(t)','y=exp(-t^2)');
calerf(1,0)
2/sqrt(%pi)*intg(0,1,f)
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="erf.htm">
        <tt>
          <b>erf</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="erfc.htm">
        <tt>
          <b>erfc</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="erfcx.htm">
        <tt>
          <b>erfcx</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>W. J. Cody (code from Netlib (specfun))</p>
  </body>
</html>
